package com.juntuo.Enums;

public enum ParkStatus {

    BINDED(1, "已经绑定"),
    WAITING_FOR_BIND(0, "未绑定");
    private int code;

    private String desc;

    public int getCode() {
		return code;
	}

	public String getDesc() {
        return desc;
    }

    ParkStatus(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    
    public static ParkStatus getByStatus(int status){
        ParkStatus result = null;
    	for (ParkStatus e : ParkStatus.values()) {
			if(e.getCode() == status){
				result = e;
				break;
			}
		}
    	return result;
    }
}
